package com.bh.order.mapper;

import com.bh.common.basemapper.RootMapper;
import com.bh.order.domain.JcOrder;
import com.bh.order.dto.JcOrderQueryDto;
import com.bh.order.vo.JcOrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 订单Mapper接口
 *
 * @author slx
 * @date 2023-04-22
 */
@Mapper
public interface JcOrderMapper extends RootMapper<JcOrder> {

    /**
     * 查询订单列表
     *
     * @param jcOrder 订单
     * @return 订单集合
     */
    public List<JcOrder> selectJcOrderList(JcOrderQueryDto jcOrder);

    /**
     * 查询订单列表
     *
     * @return 订单集合
     */
    public List<JcOrder> selectJcOrderListByCustomerId(@Param("customerId") Long customerId, @Param("startDate") Date startDate, @Param("endDate") Date endDate);


    /**
     * 查询订单列表
     *
     * @param jcOrder 订单
     * @return 订单集合
     */
    public List<JcOrderVO> selectJcOrderVoList(JcOrderQueryDto jcOrder);

    /**
     * 查询订单列表
     *
     * @param jcOrder 订单
     * @return 订单集合
     */
    public Map<String, Object> selectJcOrderVoListStatistics(JcOrderQueryDto jcOrder);

    /**
     * 查询订单列表
     *
     * @param jcOrder 订单
     * @return 订单集合
     */
    public List<JcOrderVO> selectLedgerDetailList(JcOrderQueryDto jcOrder);


    /**
     * 查询订单列表
     *
     * @param code
     * @return
     */
    public JcOrder selectJcOrderByCode(@Param("code") String code);

    /**
     * 查询订单列表
     *
     * @param code
     * @return
     */
    public JcOrder selectJcOrderByRelateBill2(@Param("code") String code, @Param("jcCustomerId") Long jcCustomerId);

    /**
     * 查询订单列表,仅仅查询ID
     *
     * @param ledIds
     * @return
     */
    public JcOrder selectJcOrderByLedIds(@Param("ledIds") List<String> ledIds, Integer status);


    public List<JcOrder> selectJcOrderListByCodes(@Param("codes") List<String> codes);
}
